﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>

<script type="text/javascript">
    function proRes(ajaxContext) {
        var restag = {};
        try {
            restag = ajaxContext.get_response().get_object();
        } catch (e) {
            alert("程序出现错误，请联系管理员");
            return;  // return if result is not json
        }

        if (restag.res != true) {
            alert(restag.msg);
        }
        else {
            alert("操作成功");
            $('#menu_alldutyist').trigger('click');
            $.fn.deltab('8-2');
        }
    }
</script>

<div id="addduty">
    <%using (Ajax.BeginForm("DoDutyAddOrUpdate", "Basic", new AjaxOptions { OnSuccess = "proRes" }))
      { %>
    <input type="submit" value="保存" style="margin-top: 5px;" />
    <div style="padding-top: 40px; padding-left: 10px">
        <%=Html.Hidden("duty_id",ViewData["duty_id"]) %>
        <p style="margin: 10px 0;">
            职位名称:<%=Html.TextBox("duty_name", ViewData["duty_name"], new { @style = "width:280px; margin-left:8px; border:solid 1px #6C92AD;" })%></p>
        <p style="margin: 10px 0;">
            <span style="padding-left: 25px;">描述:</span><%=Html.TextBox("duty_desn", ViewData["duty_descn"], new { @style = "width:280px; margin-left:8px; border:solid 1px #6C92AD;" })%></p>
        <%--   <p style="margin: 10px 0;">
            <span style="padding-left: 25px;">部门:</span><%=Html.DropDownList("dept_list", null, new { @style = "width:282px; margin-left:8px; padding:0px;border-radius:0px 0px 0px 0px;border:solid 1px #6C92AD;" })%></p>--%>
    </div>
    <%} %>
</div>
